package com.wad.common.exception;
import com.wad.vo.common.ResultCodeEnum;
import lombok.Data;

/**
 * @author wad
 * @date 2023/11/29 15:45
 * @project e-commerce
 **/

@Data
public class BussinessException extends RuntimeException{

    private Integer code;
    private String message;

    private ResultCodeEnum resultCodeEnum;

    public BussinessException(ResultCodeEnum resultCodeEnum){
        this.resultCodeEnum=resultCodeEnum;
        this.code=resultCodeEnum.getCode();
        this.message=resultCodeEnum.getMessage();
    }
}
